<?php get_header(); ?>

<div id="main" class="singular mpos">
  <?php if( have_posts() ): while( have_posts() ): the_post();?>
  <div class="path"> <strong>
    <?php the_author();?>
    </strong> 发表于
    <?php the_time('Y年m月j日');?>
    分类：
    <?php echo get_the_category_list(', ');?>
  </div>
  <div class="entry">
    <h1 class="entry-title"><a href="<?php the_permalink();?>" rel="bookmark" title="Permalink to <?php the_title();?>">
      <?php the_title();?>
      </a><?php if($GLOBALS['option']['google-plus-one']) :?><span class="plus-one"><g:plusone></g:plusone></span><?php endif; ?>
	</h1>
    <div class="entry-content">
      <?php the_content();?>
    </div>
    <?php if($GLOBALS['option']["single_copyright"]):?>
    <div class="entry-author" style="background-image:url(<?php echo 'http://www.gravatar.com/avatar/'.md5(get_the_author_meta('user_email')).'?s=80'; ?>);">
      <?php if($GLOBALS['option']["copyright_content"]==''):?>
      <strong>版权所有
      <?php bloginfo('name');?>
      </strong><br />
      本作品采用<a href="http://creativecommons.org/licenses/by-sa/3.0/" rel="license external nofollow">知识共享署名-相同方式共享 3.0 Unported许可协议</a>&nbsp;<img alt="知识共享许可协议" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/80x15.png" />&nbsp;进行许可。
      <?php else: echo stripslashes($GLOBALS['option']["copyright_content"]);endif;?>
      <br />
      <span class="entry-link">引用地址：
      <?php the_permalink();?>
      </span><br />
      <span class="entry-tags">标签：
      <?php the_tags('',', ','');?>
      </span><br />
    </div>
    <?php endif;?>
    <div id="postlist">
      <?php if(!dynamic_sidebar('bottom')): ?>
      <span>最新日志</span>
      <ul>
        <?php echo get_latest_posts(5); ?>
      </ul>
      <span>相关日志</span>
      <ul>
        <?php echo wp_get_related_posts(5); ?>
      </ul>
      <span>随便看看</span>
      <ul>
        <?php echo get_random_posts(5); ?>
      </ul>
      <?php endif;?>
      <div id="single_bottom_ad"> <?php echo stripslashes($GLOBALS['option']["bottom_ad"]);?> </div>
      <div class="clear"></div>
    </div>
    <div class="entry-nav"><span class="lf">
      <?php previous_post_link('上一篇：%link', '%title', FALSE); ?>
      </span><span class="rf">
      <?php next_post_link('下一篇：%link', '%title', FALSE); ?>
      </span></div>
  </div>
  <!--end entry-->
  <div class="clear"></div>
  <?php comments_template('',true);?>
  <?php endwhile;?>
  <?php endif;?>
</div>
<div id="lbar" class="lpos">
  <?php get_template_part("sidebar_l","single");?>
</div>
<div id="rbar" class="rpos">
  <?php get_template_part("sidebar_r","single");?>
</div>
<?php get_footer(); ?>
